import { defHttp } from "@/utils/http";

// ERP 投标小组 VO
export interface BidTeamVO {
	id: number; // 主键
	name: string; // 名称
	parentId: number; // 父级ID
	sqNumb: string; // 序号
}

// ERP 投标小组 API
export const BidTeamApi = {
	// 查询投标小组分页
	getBidTeamPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/bidding-team/page`, params });
	},

	// 查询投标小组详情
	getBidTeam: async (id: number) => {
		return await defHttp.get({ url: `/whs/bidding-team/get?id=` + id });
	},

	// 新增投标小组
	createBidTeam: async (data: BidTeamVO) => {
		return await defHttp.post({ url: `/whs/bidding-team/create`, data });
	},

	// 修改投标小组
	updateBidTeam: async (data: BidTeamVO) => {
		return await defHttp.put({ url: `/whs/bidding-team/update`, data });
	},

	// 删除投标小组
	deleteBidTeam: async (id: number) => {
		return await defHttp.delete({
			url: `/whs/bidding-team/delete?id=` + id
		});
	},

	// 导出投标小组 Excel
	exportBidTeam: async (params: any) => {
		return await defHttp.download({ url: `/whs/bidding-team/export-excel`, params });
	}
};
